package com.neuedu.his.controller;

import com.alibaba.fastjson.JSON;

import com.neuedu.his.common.Page;
import com.neuedu.his.common.Ret;
import com.neuedu.his.common.core.BaseController;
import com.neuedu.his.entity.Register;
import com.neuedu.his.common.core.BaseService;
import com.neuedu.his.entity.UmsUser;
import com.neuedu.his.service.RegisterService;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;


@WebServlet("/register/*")
public class RegisterController extends BaseController<Register> {

    RegisterService registerService = new RegisterService();


    @Override
    public BaseService getService() {
        return  registerService ;
    }

    public Map initRegist(HttpServletRequest request, HttpServletResponse response){
        Map res = registerService.initEdit(request);
        return res;
    }


    /**
     * 根据 级别和科室 查询 满足的医生
     * @param request
     * @param response
     * @return
     */
    public List<UmsUser> queryDoctors(HttpServletRequest request, HttpServletResponse response){
        return  registerService.queryDoctors(request);
    }


    /**
     * 根据患者Id，查询 患者信息， 申请的检查、检验的信息    药品、处置....
     * @param request
     * @param response
     * @return
     */
    public Map  queryRegistFeeItems(HttpServletRequest request, HttpServletResponse response){
        return registerService.queryRegistFeeItems(request);
    }


    /**
     * 收费
     * @param request
     * @param response
     * @return
     */
    public boolean  fee(HttpServletRequest request, HttpServletResponse response){
        return registerService.fee(request);
    }


    /**
     * 退费
     * @param request
     * @param response
     * @return
     */
    public boolean  refund(HttpServletRequest request, HttpServletResponse response){
        return registerService.refund(request);
    }


    public boolean handlerRefundNumber(HttpServletRequest request , HttpServletResponse response){
        return registerService.handlerRefundNumber(request);
    }
}